cmake_minimum_required(VERSION 3.24)
project(iec_101_client)
set(CMAKE_CXX_STANDARD 17)           # 设置 C++ 标准为 C++17
set(CMAKE_CXX_STANDARD_REQUIRED ON)  # 确保使用 C++17 标准
set(CMAKE_CXX_EXTENSIONS OFF)        # 关rm 闭编译器扩展，使用标准合规的代码

# 收集所有源文件
file(GLOB SOURCES
    "iec_101_client.c"
    "iec_101_common/*.c"
)


add_executable(iec_101_client ${SOURCES})

# 为整个项目设置链接 pthread
find_package(Threads REQUIRED)
target_link_libraries(iec_101_client Threads::Threads)